/**
 * @file CMBacktraceSelf_test.cpp
 * @author jmdvirus
 * @date 2021-06-10 15:42:53
 */

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ucontext.h>
#include <unistd.h>

#include "CMSignalAction.h"

void *signal_ret(int sig)
{
    printf("sig %d\n", sig);
    exit(-1);
}

int main(int argc, char **args)
{
    init_signal(signal_ret);

    struct Test
    {
        char value[128];
    };
    struct Test *t = NULL;
    sleep(2);
    sprintf(t->value, "%s", "this is the test value");
    getchar();
    return 0;
}